// https://leetcode.cn/problems/defanging-an-ip-address/
#include <iostream>
#include <string>
#include <regex>

using namespace std;

class Solution {
public:
    string defangIPaddr(string address) {
        regex e ("\\.");
        return regex_replace(address,e,"[.]");
    }
};